<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EasyXPlus: easyColor.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EasyXPlus
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">EasyXPlus is a simple graphic library for C++ BEGINNERS under Windows.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">easyColor.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef EASY_COLOR_H</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#define EASY_COLOR_H</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;windows.h&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_easy_x_plus.html">EasyXPlus</a></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;{</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="class_easy_x_plus_1_1_colorable.html">   22</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_easy_x_plus_1_1_colorable.html">Colorable</a></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    {</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;        <span class="keyword">virtual</span> ~<a class="code" href="class_easy_x_plus_1_1_colorable.html">Colorable</a>()    {}</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        <span class="keyword">virtual</span> COLORREF toColorref() <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    };</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="class_easy_x_plus_1_1_rgb.html">   32</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> : <span class="keyword">public</span> <a class="code" href="class_easy_x_plus_1_1_colorable.html">Colorable</a></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    {</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        <span class="keyword">virtual</span> ~<a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>()          {}</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keyword">virtual</span> COLORREF toColorref() <span class="keyword">const</span>;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> R, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> G, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> B);</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keyword">explicit</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(COLORREF colorValue);</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <span class="keywordtype">bool</span> operator == (<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> otherColor)<span class="keyword">const</span>;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <span class="keywordtype">bool</span> operator != (<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> otherColor)<span class="keyword">const</span>;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> getR() <span class="keyword">const</span>;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> getG() <span class="keyword">const</span>;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> getB() <span class="keyword">const</span>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Black()      { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(0, 0, 0); }</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> White()      { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(255, 255, 255); }</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Blue()       { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(0, 0, 255); }</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Red()        { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(255, 0, 0); }</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Green()      { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(0, 255, 0); }</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Grey()       { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(190, 190, 190); }</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Cyan()       { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(0, 255, 255); }</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Yellow()     { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(255, 255, 0); }</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Salmon()     { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(250, 128, 114); }</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Coral()      { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(225, 127, 80); }</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Pink()       { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(255, 192, 203); }</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Turquoise()  { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(64, 224, 208); }</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> SeaGreen()   { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(46, 139, 87); }</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Goldenrod()  { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(218, 165, 32); }</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Orange()     { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(255, 165, 0); }</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Orchid()     { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(218, 112, 214); }</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Violet()     { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(238, 130, 238); }</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> Magenta()    { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(255, 0, 255); }</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> LightGrey()  { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(211, 211, 211); }</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> LightBlue()  { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(173, 216, 230); }</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> LightCyan()  { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(224, 255, 255); }</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> LightYellow(){ <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(255, 255, 224); }</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> LightSalmon(){ <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(255, 160, 122); }</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> LightCoral() { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(240, 128, 128); }</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> LightPink()  { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(255, 182, 193); }</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> LightGreen() { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(144, 238, 144); }</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> DarkTurquoise()  { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(0, 206, 209); }</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> DarkGreen()      { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(0, 100, 0); }</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> DarkSeaGreen()   { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(143, 188, 143); }</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> DarkGoldenrod()  { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(184, 143, 11); }</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> DarkSalmon()     { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(233, 150, 122); }</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> DarkOrange()     { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(255, 140, 0); }</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> DarkOrchid()     { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(153, 50, 204); }</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> DarkViolet()     { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(148, 0, 211); }</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> DarkGrey()       { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(169, 169, 169); }</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> DarkBlue()       { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(0, 0, 139); }</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> DarkCyan()       { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(0, 139, 139); }</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> DarkMagenta()    { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(139, 0, 139); }</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a> DarkRed()        { <span class="keywordflow">return</span> <a class="code" href="class_easy_x_plus_1_1_rgb.html">Rgb</a>(139, 0, 0); }</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keyword">protected</span>:</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        COLORREF colorValue;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    };</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;}</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="class_easy_x_plus_1_1_rgb_html"><div class="ttname"><a href="class_easy_x_plus_1_1_rgb.html">EasyXPlus::Rgb</a></div><div class="ttdoc">Colors represented in RGB color model. </div><div class="ttdef"><b>Definition:</b> easyColor.h:32</div></div>
<div class="ttc" id="class_easy_x_plus_1_1_colorable_html"><div class="ttname"><a href="class_easy_x_plus_1_1_colorable.html">EasyXPlus::Colorable</a></div><div class="ttdoc">An interface for color models. </div><div class="ttdef"><b>Definition:</b> easyColor.h:22</div></div>
<div class="ttc" id="namespace_easy_x_plus_html"><div class="ttname"><a href="namespace_easy_x_plus.html">EasyXPlus</a></div><div class="ttdef"><b>Definition:</b> easyBitmap.h:15</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
